home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / VAL2WRDS.DMO < prev    next >
Text File  |  1996-07-04  |  2KB  |  51 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   VAL2WRDS.DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. '.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
  19. ' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
  20.  
  21. $INCLUDE "DAS-NB01.INC"
  22. COLOR 7,0
  23. CLS
  24.  
  25. ? "┌───────────────────────────────────────────────────────────────────────
  26. ? "│ fValue2Words$ ( Number# )
  27. ? "├────────────────────────────────────────────────────────────────────────
  28. ? "│ Convert numbers into words for check printing, etc.
  29. ? "│
  30. ? "│ As the routine stands now it will return 2 places past the decimal. If
  31. ? "│ you are working in a country that requires something different than the
  32. ? "│ N.American style then the code can quickly be modified.
  33. ? "└──────────────────────────────────────────────────────────────────────────
  34. ?
  35.  
  36. Number# = 1234.50
  37. PRINT USING "Our number is: ##,###,###,###.##"; Number#
  38. PRINT
  39.  
  40. D$ = fValue2Words$( Number# )
  41. PRINT "AMERICAN: "; D$
  42. PRINT
  43.  
  44. REPLACE "DOLLARS" WITH "POUNDS" IN D$
  45. REPLACE " CENTS"   WITH "p"  IN D$
  46. PRINT " ENGLISH: "; D$
  47. PRINT
  48. PRINT "Or, just modify the code!"
  49.  
  50.  
  51.